from django.shortcuts import render, HttpResponse
from .models import Article, Category


def index(request):
    # category = Category(name='最新文章')
    # category.save()
    # article = Article(title='钢铁是怎么炼成的', content='123456abs')
    # article.category = category
    # article.save()

    category = Category.objects.get(pk=5)
    category.delete()
    return HttpResponse('successs')